package com.shangxian.giveithome.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class UserLog {
    /****/
    private Integer id;

    /**
     * 用户id
     **/
    private Long userId;

    /**
     * 用户请求地址
     **/
    private String url;

    /**
     * 请求参数
     **/
    private String param;

    /**
     * 记录原因
     **/
    private String reason;

    /**
     * 记录时间
     **/
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date create;

    public UserLog() {
    }


    public UserLog(Long userId, String url, String param, String reason) {
        this.userId = userId;
        this.url = url;
        this.param = param;
        this.reason = reason;
    }
}